home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
gsdb21.arc
/
DB_XPL01.PAS
next >
Wrap
Pascal/Delphi Source File
|
1991-01-04
|
1KB
|
29 lines
program DB_Xpl01;
uses
CRT,
DOS,
GS_dBFld,
GS_dBase;
var
Health : GS_dBFld_Objt; {object of type GS_dBFld_Objt}
begin
ClrScr;
Health.Init('HEALTH'); {Initialize object using the dBase III}
{file HEALTH.DBF. Extension assumed}
Health.Open; {Open the object's file}
Health.GetRec(Top_Record); {Get the first record in the file}
while not Health.File_EOF do {Repeat until end-of-file}
begin
writeln(Health.FieldGet('FOOD'),' ',
Health.FieldGet('CALS'),' (',
Health.FieldGet('FOOD_CODE'),')');
{Displays three fields. Each field is}
{retrieved by passing the field name to}
{objectname.Formula }
Health.GetRec(Next_Record); {Get the next sequential record}
end;
Health.Close; {Close the dBase III file}
end.